import Vue from 'vue'
import VueRouter from 'vue-router'
const routes = [
  {
    path: '/',
    component: () => import('../views/Home.vue'),
  },
  {
    path: '/about',
    component: () => import('../views/About.vue'),
  },
  {
    path: '/list',
    component: () => import('../views/List.vue'),
  },
  {
    path: '/alllist',
    component: () => import('../views/listAll.vue'),
  },
  {
    path: '/echart',
    component: () => import('../views/Echart.vue'),
  },
  {
    path: '/message',
    component: () => import('../views/message.vue'),
  },
  {
    path: '/detail',
    component: () => import('../views/detail.vue'),
  },
  { path: '/type/article', component: () => import('../views/TypeList.vue') },
]

// 3. 创建 router 实例，然后传 `routes` 配置
// 你还可以传别的配置参数, 不过先这么简单着吧。
const router = new VueRouter({
  routes, // (缩写) 相当于 routes: routes
})
Vue.use(VueRouter)
export default router
